import React, { Component } from 'react'
import Left from './views/Left'
import Right from './views/Right'
export default class App extends Component {
  state = {
    msgFromLeft: ''
  }
  getLeftChildMsg = (data) => {
    this.setState(() => {
      return {
        msgFromLeft: data
      }
    })
  }
  render() {
    return (
      <div style={{ display: 'flex' }}>
        <Left callback={this.getLeftChildMsg}></Left>
        <Right fromParentMsg={this.state.msgFromLeft}></Right>
      </div>
    )
  }
}
